export default {
  data() {
    return {
      loading: false,//加载列表中
      finished: false,//是否结束加载列表
      page: 1,//页码
      pageSize: 10,//每页数量
      refreshing: false,//是否重新加载数据
    };
  },
  methods: {
    judgement(len, totalPage) {
      if (len < this.pageSize || totalPage == this.page) {
        this.finished = true//结束加载数据
      }
      this.page += 1
      this.loading = false
      this.refreshing = false
    },
    /**
     * 初始化数据
     */
    initData() {
      this.page = 1
      this.finished = false
      this.loading = true

    },
    refreshInit() {
      this.initData()
      this.refreshing = true
    },
  }
}